home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / smalltlk.zip / SOURCES / ENV.H < prev    next >
Text File  |  1990-09-13  |  6KB  |  195 lines

  1. /*
  2.     Little Smalltalk
  3.  
  4.     execution environment definitions.
  5.  
  6. The Little Smalltalk system is tailored to various machines by
  7. changing defined constants.  These constants, and their meanings,
  8. are as follows:
  9.  
  10. CURSES    defined if the curses(3) library is available and the primitive
  11.     graphics it provides is desired
  12.  
  13. GAMMA    defined if gamma() is part of the math library
  14.  
  15. ENVSAVE    defined if it is required to save environ during fast load
  16.  
  17. FACTMAX    maximum integer value for which a factorial can be computed by
  18.     repeated multiplication without overflow.
  19.  
  20. FASTDEFAULT    defined if the default behavior should be to do a fast load
  21.  
  22. FLUSHREQ    if defined a fflush is given after every call to printf
  23.         or fprintf
  24.  
  25. INLINE    generate inline code for increments or decrements -
  26.     produces larger, but faster, code.
  27.  
  28. MDWINDOWS    defined if the maryland windows package is used
  29.  
  30. NOSYSTEM    defined if the system() call is NOT provided
  31.         (seriously limits functionality)
  32.  
  33. OPEN3ARG    defined if 3 argument style opens are used
  34.  
  35. PLOT3    defined if you have a device for which the plot(3) routines work
  36.     directly on the terminal (without a filter)
  37.     provides many of these routines as primitive operations
  38.     (see class PEN in /prelude)
  39.  
  40. SMALLDATA    if defined various means are used to reduce the size of the
  41.         data segment, at the expense of some functionality.
  42.  
  43. SIGS        define in the signal system call is available
  44.         for trapping user interrupt signals
  45.  
  46. SETJUMP        defined if the setjump facility is available
  47.  
  48.     In addition to defining constants, the identifier type ``unsigned
  49. character'' needs to be defined.  Bytecodes are stored using this datatype.
  50. On machines which do not support this datatype directly, macros need to be
  51. defined that convert normal chars into unsigned chars.  unsigned chars are
  52. defined by a typedef for ``uchar'' and a pair of macros that convert an int
  53. into a uchar and vice-versa.
  54.  
  55.     In order to simplify installation on systems to which the
  56. Little Smalltalk system has already been ported, various ``meta-defines''
  57. are recognized.  By defining one of these symbols, the correct definitions
  58. for other symbols will automatically be generated.  The currently
  59. recognized meta-defines are as follows:
  60.     
  61. BERK42    Vax Berkeley 4.2
  62. DECPRO    Dec Professional 350 running Venix
  63. HP9000    Hewlett Packard 9000
  64. PDP1170    PdP 11/70 (also other PDP 11 machines)
  65. PERKELM    Perken Elmer 8/32
  66. RIDGE    Ridge ROS 3.1
  67.  
  68.     Finally, a few path names have to be compiled into the code.
  69. These path names are the following:
  70.  
  71. TEMPFILE - a temporary file name in mktemp format
  72. PARSER - the location of the parser
  73. PRELUDE - the location of the standard prelude in ascii format
  74. FAST - the location of the standard prelude in saved format
  75. LIBLOC - the location of the directory for additional libraries
  76.  
  77. */
  78.  
  79. # define TEMPFILE "\\stXXXXXX"
  80. # define PARSER   "\\smalltlk\\parser\\parse"
  81. # define PRELUDE  "\\smalltlk\\prelude\\standard"
  82. # define FAST     "\\smalltlk\\prelude\\stdsave"
  83. # define LIBLOC      "\\smalltlk\\prelude"
  84.  
  85. /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>meta-define <<<<<<<<<<<<<<<*/
  86.  
  87. # define PCTURBO
  88.  
  89. /*------------------------------  MS-DOS using Turbo C */
  90. # ifdef PCTURBO
  91.  
  92. # define FACTMAX 8
  93. # define FLUSHREQ    /* flush after every printf */
  94. # define SIGS
  95. # define SETJUMP
  96. typedef unsigned char uchar;
  97. # define itouc(x) ((uchar) x)
  98. # define uctoi(x) ((int) x)
  99. /*# define FASTDEFAULT*/    /* default to fast-loading */
  100.  
  101. # endif        /* PCTURBO definition */
  102.  
  103. /*------------------------------  VAX Berkeley 4.2 definition */
  104. # ifdef BERK42
  105.  
  106. /* # define GAMMA    */    /* gamma value is known */
  107. # define FACTMAX 12
  108. # define FLUSHREQ    /* flush after every printf */
  109. # define SIGS
  110. # define SETJUMP
  111. typedef unsigned char uchar;
  112. # define itouc(x) ((uchar) x)
  113. # define uctoi(x) ((int) x)
  114. /* # define MDWINDOWS */
  115. /* FASTLOADING DOES work, and should eventually be defined to be standard*/
  116. /*# define FASTDEFAULT*/    /* default to fast-loading */
  117.  
  118. # endif        /* BERK42 definition */
  119.  
  120. /*------------------------------  HP 9000 / HP - UX definition */
  121. # ifdef HP9000
  122.  
  123. # define GAMMA        /* gamma value is known */
  124. # define FACTMAX 12
  125. # define FLUSHREQ    /* flush after every printf */
  126. # define SIGS
  127. # define SETJUMP
  128. typedef unsigned char uchar;
  129. # define itouc(x) ((uchar) x)
  130. # define uctoi(x) ((int) x)
  131.  
  132. # endif        /* HP 9000 definition */
  133.  
  134. /* ---------------------------------------RIDGE ROS 3.1 definition */
  135. # ifdef RIDGE
  136.  
  137. # define GAMMA        /* gamma value is known */
  138. # define FACTMAX 12
  139. typedef unsigned char uchar;
  140. # define itouc(x) ((uchar) x)
  141. # define uctoi(x) ((int) x)
  142.  
  143. # endif        /* RIDGE definition */
  144.  
  145. /* --------------------------------------------DEC PRO definitions */
  146. # ifdef DECPRO
  147.  
  148. /* GAMMA, OPEN3ARG not defined */
  149. # define ENVSAVE
  150. # define FACTMAX 8
  151. # define SMALLDATA
  152. /* unsigned characters not supported, but can be simulated */
  153. typedef char uchar;
  154. # define itouc(x) ((uchar) x)
  155. # define uctoi(x) (unsigned) (x >= 0 ? x : x + 256)
  156.  
  157. # endif        /* DECPRO definition */
  158.  
  159. /* --------------------------------------------PDP11/70 definitions */
  160. # ifdef PDP1170
  161.  
  162. /* GAMMA, OPEN3ARG not defined */
  163. # define ENVSAVE
  164. # define FACTMAX 8
  165. # define FLUSHREQ
  166. # define SIGS
  167. # define SETJUMP
  168. /* unsigned characters not supported, but can be simulated */
  169. typedef char uchar;
  170. # define itouc(x) ((uchar) x)
  171. # define uctoi(x) (unsigned) (x >= 0 ? x : x + 256)
  172.  
  173. # endif        /* PDP1170 definition */
  174.  
  175. /*------------------------------  Perkin Elmer 8/32 definitions */
  176. # ifdef PERKELM
  177.  
  178. # define ENVSAVE
  179. # define FACTMAX 12
  180. # define FLUSHREQ    /* flush after every printf */
  181. typedef unsigned char uchar;
  182. # define itouc(x) ((uchar) x)
  183. # define uctoi(x) ((int) x)
  184.  
  185. # endif        /* PERKELM definition */
  186.  
  187. /******************************************************************/
  188. /*
  189.     the following are pretty much independent of any system
  190. */
  191.  
  192. # define INLINE        /* produce in line code for incs and decs */
  193. /* # define CURSES    */
  194. /* # define PLOT3     */
  195.